import request from '@/axios/request'
import url from '@/axios/url'
const { mesUrl, adminUrl } = url()
// 导出url
export const exportUrl = `${mesUrl}mesProdOtherCodePrintHistory/export`
// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesProdOtherCodePrintHistory`,
    method: 'get',
    params
  })
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesProdOtherCodePrintHistory`,
    method: 'post',
    data
  })
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesProdOtherCodePrintHistory`,
    method: 'put',
    data
  })
}
// 删除
export function rowDel (id) {
  return request({
    url: `${mesUrl}mesProdOtherCodePrintHistory/${id}`,
    method: 'put'
  })
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesProdOtherCodePrintHistory/info/${id}`,
    method: 'get'
  })
}

// 查询打印条码模板名称列表
export function getBarcodePrintTempList (data = {}) {
  return request({
    url: `${adminUrl}printTemplate/getTempList`,
    method: 'post',
    data
  })
}

/* 根据名称打印模板详情 */
export function printTemplateInfoName (data) {
  return request({
    url: `${adminUrl}printTemplate/detailbyName`,
    method: 'post',
    data
  })
}

// 根据配置项编码按层级查询
export function selectListByConfigurationCode (params) {
  return request({
    url: `${adminUrl}commonConfigurationItem/selectListByConfigurationCode`,
    method: 'get',
    params
  })
}
//获取打印次数
export function getPrintingTimes (params) {
  return request({
    url: `${mesUrl}productExtensionProperties/selectOne`,
    method: "get",
    params,
  });
}